package com.ttdevs.util;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class DialogUtil {

	public static AlertDialog getSubmitDialog(Context context, String title, DialogInterface.OnClickListener listener) {
		AlertDialog dialog = new AlertDialog.Builder(context).setTitle(title).setCancelable(false)
				.setPositiveButton("确定", listener).create();
		return dialog;
	}

	public static AlertDialog getNormalDialog(Context context, String title,
			DialogInterface.OnClickListener submitListener, DialogInterface.OnClickListener cancelListener) {
		AlertDialog dialog = new AlertDialog.Builder(context).setTitle(title).setCancelable(false)
				.setPositiveButton("确定", submitListener).setNegativeButton("取消", cancelListener).create();
		return dialog;
	}
}
